Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / About Color Profile Objects


Zero-Length Profiles

QuickDraw GX automatically performs color matching whenever it draws or converts colors, and if you specify a nil color profile reference in any situation, QuickDraw GX uses the default color profile rather than using no profile.

In some cases, however, you may want to prevent color matching from occurring for individual colors or shapes, such as when comparing or calibrating different devices. To do so, you can use a zero-length profile. A zero-length profile is a color profile object in which the profile data is of zero length. It is a valid QuickDraw GX object--its reference is not nil--but it contains no data. If you attach a zero-length profile to a color, QuickDraw GX performs no matching when that color is drawn or converted.

If, for example, you want to see how each attached device represents pure blue, you can specify pure blue for an ink's color, attach a zero-length profile to it, and draw a shape with that color to each device. If instead you specify nil for the profile when creating
a color, QuickDraw GX matches the color, using the default color profile and each device's color profile, when drawing.

In the case of color conversions that require a profile (those between base families, such as from RGB to XYZ), QuickDraw GX uses the following conventions:

Note
To turn off color matching entirely when drawing to a view port, make sure that the gxEnableMatchPort attribute for that view port is cleared. (It is cleared by default.) View port attributes are discussed in the chapter "View-Related Devices" in this book.
You can create a zero-length profile using the GXNewColorProfile function, described on page 4-79, or the GXSetColorProfile function, described on page 4-89.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996